{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-btn-group fl">
            <a href="{:url('admin/project/add')}" class="layui-btn"><i class="fa fa-plus-circle"></i> 添加项目</a>
        </div>
        <div class="fl ml20">
            <form action="{:url('admin/project/index')}" class="layui-form" method="get" style="padding:0px;">
                <div class="layui-form-item">
                    <div class="layui-input-inline">
                        <input type="text" name="key" value="{:input('name')}" autocomplete="off" placeholder="搜索项目" class="layui-input"/>
                    </div>
                    <div class="fl">
                        <button class="layui-btn layui-btn-primary ajax-search"><i class="fa fa-search"></i></button>
                    </div>
                </div>
            </form>
        </div>
        <table class="layui-table layui-form">
            <thead>
            <tr>
                <th>id</th>
                <th>项目名称</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {foreach name="list" item="v" empty="$empty"}
            <tr>
                <td>{$page*10+$key+1}</td>
                <td>{$v.name}</td>
                <td>{if $v.status eq 0}未开始{elseif $v.status eq 1}进行中{elseif $v.status eq 2}已完结{/if}</td>
                <td>
                    <a href="{:url('admin/project/edit',['id' => $v.id])}">编辑</a>
                    <a href="{:url('admin/project/del',['id' => $v.id])}">删除</a>
                    <a href="{:url('admin/member/index',['id' => $v.id])}">查看成员</a>
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        <div class="page">{$list->render()}</div>
    </div>
</div>
{/block}
